home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / WaveTableStorage.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  2.1 KB  |  61 lines  |  [TEXT/KAHL]

  1. /* WaveTableStorage.h */
  2.  
  3. #ifndef Included_WaveTableStorage_h
  4. #define Included_WaveTableStorage_h
  5.  
  6. /* WaveTableStorage module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* SampleConsts */
  12. /* Array */
  13. /* Memory */
  14. /* FixedPoint */
  15. /* DataMunging */
  16.  
  17. #include "SampleConsts.h"
  18. #include "FixedPoint.h"
  19.  
  20. struct WaveTableStorageRec;
  21. typedef struct WaveTableStorageRec WaveTableStorageRec;
  22.  
  23. /* create a new, empty wave table storage object */
  24. WaveTableStorageRec*        NewWaveTableStorage(NumBitsType NumBits, long NumFrames);
  25.  
  26. /* dispose of the wave table storage object */
  27. void                                        DisposeWaveTableStorage(WaveTableStorageRec* Storage);
  28.  
  29. /* get the number of frames per table */
  30. long                                        WaveTableStorageNumFramesPerTable(WaveTableStorageRec* Storage);
  31.  
  32. /* get the number of tables */
  33. long                                        WaveTableStorageNumTables(WaveTableStorageRec* Storage);
  34.  
  35. /* get the number of bits for the wave table */
  36. NumBitsType                            WaveTableStorageNumBits(WaveTableStorageRec* Storage);
  37.  
  38. /* get a reference to a table.  this is NOT copied, and there is no type information. */
  39. /* it is formatted as an array of characters for 8 bit data or array of shorts for */
  40. /* 16 bit data.  it contains (WaveTableStorageNumFramesPerTable + 1) elements for */
  41. /* each table.  The last element is a repeat of the first, and is provided for */
  42. /* making anti-aliasing more efficient. */
  43. void*                                        WaveTableStorageGetTable(WaveTableStorageRec* Storage,
  44.                                                     long Index);
  45.  
  46. /* append a new (zeroed out) table to the end of the array */
  47. MyBoolean                                WaveTableStorageAppendEntry(WaveTableStorageRec* Storage);
  48.  
  49. /* put a value into a frame in a table */
  50. void                                        WaveTableStorageSetFrame(WaveTableStorageRec* Storage,
  51.                                                     long TableIndex, long FrameIndex, largefixedsigned Value);
  52.  
  53. /* get a value from a frame in a table */
  54. largefixedsigned                WaveTableStorageGetFrame(WaveTableStorageRec* Storage,
  55.                                                     long TableIndex, long FrameIndex);
  56.  
  57. /* make a duplicate of the wave table */
  58. WaveTableStorageRec*        WaveTableDuplicate(WaveTableStorageRec* Original);
  59.  
  60. #endif
  61.